package client;
import pojo.*;
import java.util.*;
import java.io.*;

public class ClientDirver {

	public static void main(String[]args)
	{
		PaintClient pc=new PaintClient();
		FileInputStream in;
		try{
			in= new FileInputStream("d:/2.jpg");
			byte []data=new byte[in.available()];
			System.out.println("before data size :"+data.length);
			in.read(data);
			System.out.println("after data size :"+data.length);
			in.close();
		}catch(FileNotFoundException e)
		{
			e.printStackTrace();
		}catch(IOException e)
		{
			e.printStackTrace();
		}
//		ChatClient cc= new ChatClient();
//		Message ms=new Message("peter","zhang","聊天室1","peter talk to u and all",1);
		
//		cc.talkToAll(ms);
		
//		cc.talkToOne(ms);
//		Vector<Message>userms=cc.getUserMessage("zhang");
//		for(int i=0;i<userms.size();i++)
//		{
//			System.out.println("get message :" +userms.get(i).getMs());
//		}
//		RoomClient rc=new RoomClient();
//        Vector<String> userlist1=rc.selectRoom("peter", "聊天室1");
//		System.out.println("select room and roomsize  "+userlist1.size());

		//Vector<String> userlist2=rc.getUserList(2);
		//System.out.println("update userlist "+userlist2.size());
		//Vector<String> userlist=rc.createRoom("zhang", "聊天室4");
		//System.out.println("create room "+userlist.size());
	}
	
	
}
